import request from '@/utils/request'

export function listDimension() {
  return request({
    url: '/dimension/list',
    params: {
      'pos': 0,
      'size': 100
    },
    method: 'get'
  })
}
export function listDimensionDocByLevel(production, level) {
  return request({
    url: '/dimension/listbyproduction',
    params: {
      'production': production,
      'level': level
    },
    method: 'get'
  })
}
export function getDimensionDoc(id) {
  return request({
    url: '/dimension/getdimensiondoc',
    params: {
      'id': id
    },
    method: 'get'
  })
}
export function setDimension(dimensionmodel, dimensiondetail) {
  return request({
    url: '/dimension/set',
    data: {
      main: JSON.stringify(dimensionmodel),
      detail: JSON.stringify(dimensiondetail)
    },
    method: 'post'
  })
}
export function get(id) {
  return request({
    url: '/dimension/get',
    params: {
      'id': id
    },
    method: 'get'
  })
}
